Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat (INVT-CPC 885 ) : Ability to get product by id and details page #541

Conversation

Abdur-Siddiqui
Copy link
Collaborator

JIRA: link to jira ticket
https://champlainsaintlambert.atlassian.net/browse/CPC-885

Context:

  • I added a new feature called get product by product ID, inside the inventory
  • I created a new page called product details which displays the details of a product

Changes

  • Created a new folder called Product Details and finished front end
  • Implemented the back-end for get product details
  • My changes affect products

Before and After UI (Required for UI-impacting PRs)

Before
image

After
image

image

When you press the back products button it brings you back to inventory products page
image

, 'visits', 'vetList','vetForm','vetDetails', 'visitList', 'billForm', 'billUpdateForm', 'loginForm', 'rolesDetails', 'signupForm',
'billDetails', 'billsByOwnerId', 'billHistory','billsByVetId','inventoryList', 'inventoryForm', 'productForm','inventoryProductList', 'inventoryUpdateForm', 'productUpdateForm'
, 'verification' , 'adminPanel','resetPwdForm','forgotPwdForm','petTypeList']);
, 'visits', 'vetList','vetForm','vetDetails', 'visitList', 'billForm', 'billUpdateForm', 'loginForm', 'rolesDetails', 'signupForm', 'productDetailsInfo',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think it was necessary to add "productDetailsInfo" in the app.js?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i didn't add the product detail info, in the app.js, then my page would never render when called.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's very smart thank you for your input Mr Siddiqui.

Copy link
Collaborator

@DiSavio DiSavio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve of the code everything looks good. Look at my comments that I left about the big-warning on the edit button because I coded that part and wanted to know your thought process on changing it. Other then that great work Abdur keep it up, brother.

, 'visits', 'vetList','vetForm','vetDetails', 'visitList', 'billForm', 'billUpdateForm', 'loginForm', 'rolesDetails', 'signupForm',
'billDetails', 'billsByOwnerId', 'billHistory','billsByVetId','inventoryList', 'inventoryForm', 'productForm','inventoryProductList', 'inventoryUpdateForm', 'productUpdateForm'
, 'verification' , 'adminPanel','resetPwdForm','forgotPwdForm','petTypeList']);
, 'visits', 'vetList','vetForm','vetDetails', 'visitList', 'billForm', 'billUpdateForm', 'loginForm', 'rolesDetails', 'signupForm', 'productDetailsInfo',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad that you found out, that the order matters when setting the module on the app.js when it comes to loading new files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, took me a while to figure it out but after doing some debugging found my issue.

<td><a ui-sref="updateProductInventory({inventoryId: $ctrl.inventoryProductList[0].inventoryId, productId: product.productId})">
<button class="add-bundle-button btn btn-success">Edit</button>
<button class="add-bundle-button btn btn-warning">Edit</button>
Copy link
Collaborator

@DiSavio DiSavio Oct 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on why you changed the btn-success to the btn-warning?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My pleasure, so I changed the color from btn -success to btn - warning, because green means success and you haven't changed or modified any value yet, thats why i changed the btn color to yellow to show that you need to test the functionality of the button.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see thank you for informing me. It does make sense now because it will also match better with the inventory since the other update button in the inventories has it on "Warning" as well now that I look at it.

@github-actions
Copy link

Qodana for JVM

341 new problems were found

Inspection name Severity Problems
Redundant character escape 🔶 Warning 85
Unused import 🔶 Warning 82
Dangling Javadoc comment 🔶 Warning 14
Invalid YAML configuration 🔶 Warning 11
Integer multiplication or shift implicitly cast to 'long' 🔶 Warning 9
Default annotation parameter value 🔶 Warning 5
Lombok annotations 🔶 Warning 5
Optional.get() is called without isPresent() check 🔶 Warning 5
AutoCloseable used without 'try'-with-resources 🔶 Warning 4
Deprecated API usage 🔶 Warning 4
Field can be local 🔶 Warning 4
Link specified as plain text 🔶 Warning 4
@NotNull/@Nullable problems 🔶 Warning 4
Redundant local variable 🔶 Warning 4
Unused assignment 🔶 Warning 4
Possibly blocking call in non-blocking context 🔶 Warning 3
Nullability and data flow problems 🔶 Warning 3
Spring Data repository method parameters errors 🔶 Warning 3
'Optional' used as field or parameter type 🔶 Warning 2
Unused publisher 🔶 Warning 2
Redundant type cast 🔶 Warning 2
Call to 'printStackTrace()' 🔶 Warning 2
Field may be 'final' 🔶 Warning 1
Lombok @Getter may be used 🔶 Warning 1
Mismatch in @PathVariable declarations and usages 🔶 Warning 1
Redundant 'close()' 🔶 Warning 1
Begin or end anchor in unexpected position 🔶 Warning 1
'size() == 0' can be replaced with 'isEmpty()' 🔶 Warning 1
Unnecessary call to 'toString()' 🔶 Warning 1
Commented out code ◽️ Notice 37
Non recommended 'field' injections ◽️ Notice 18
Duplicated code fragment ◽️ Notice 14
Constant values ◽️ Notice 1
Mismatch in @PathVariable declarations and usages ◽️ Notice 1
Throw statement in Reactive operator ◽️ Notice 1
Regular expression can be simplified ◽️ Notice 1

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@Abdur-Siddiqui Abdur-Siddiqui merged commit ebda4d2 into main Oct 11, 2023
3 checks passed
@Abdur-Siddiqui Abdur-Siddiqui deleted the feat/INVT-CPC-885_Ability_To_Get_Product_By_Id_And_Details_Page branch October 11, 2023 05:10
@Abdur-Siddiqui Abdur-Siddiqui restored the feat/INVT-CPC-885_Ability_To_Get_Product_By_Id_And_Details_Page branch October 17, 2023 02:13
@Abdur-Siddiqui Abdur-Siddiqui deleted the feat/INVT-CPC-885_Ability_To_Get_Product_By_Id_And_Details_Page branch October 17, 2023 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants